use constant CALLER => "test.pl";
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'

######################### We start with some black magic to print on failure.

# Change 1..1 below to 1..last_test_to_print .
# (It may become useful if the test is moved to ./t subdirectory.)

my $test = 1;
sub ok {
    print "ok " . $test++ . "\n";
}

BEGIN { $| = 1; print "$test..$test\n"; }
END {print "not ok $test++\n" unless $loaded;}
use CastCopy;
$loaded = 1;
&ok;

######################### End of black magic.

# Insert your test code below (better if it prints "ok 13"
# (correspondingly "not ok 13") depending on the success of chunk 13
# of the test code):

# test case 2
my $obj = new CastCopy;
$obj->set_verbose(1);
&ok;

# test case 3
$obj->set_caller(CALLER);
print ($result); # eq "" ? "ok 3\n" : "not ok 3\n");
&ok;

# test case 4
$obj->set_blocksize(1024);
&ok;

# test case 5
$obj->set_control_address('239.1.1.101');
&ok;

# test case 6
$obj->set_control_port('22001');
&ok;

# test case 7
$obj->set_data_address('239.1.1.100');
&ok;

# test case 8
$obj->set_data_port('22000');
&ok;

# test case 9
$obj->verbose("verbose test");
&ok;

# test case 10
$obj->set_verbose(0);
print ($result); # eq "" ? "ok 3\n" : "not ok 3\n");
&ok;

# test case 11
$obj->check_config;
&ok;
